package com.wc.alorithm_blue_bridge._动态规划.线性DP.奇数子方阵;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2024/1/21 16:33
 * @description https://www.lanqiao.cn/problems/5657/learning/?page=1&first_category_id=1
 */
public class Main {
    static int N = 110;
    // f[i] 表示i * i 方阵中的奇子矩阵个数f[i-2]相当于计算了长度为3的子矩阵
    static int[] f = new int[N];

    public static void main(String[] args) {
        f[1] = 1;
        f[2] = 4;
        for (int i = 3; i < N; i++) {
            f[i] = i * i + f[i - 2];
        }
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println(f[n]);
    }
}
